const path = require('path');
const glob = require('glob');

const entryFiles = glob.sync(path.join(__dirname, './src/*/index.js'));

// console.log('entryFiles: ', entryFiles);

entryFiles.map( (item) => {
    // console.log(item)
    const match = item.match(/src\/(.*)\/index\.js/)
    const folder = match && match[1];
    console.log(folder)
} );